Solana Indexer DBC pool improvements#485
Merged
Merged
Conversation
rickyrombo
commented
Oct 18, 2025
Contributor
- Clamp graduation progress at 1.0
- Remove DBC pool from create coin endpoint
- Track DBC pool using memcmp filters and artist coin base mints
- Track DBC VolatilityTracker (for completeness) and Metrics (for fees)
raymondjacobson
approved these changes
Oct 18, 2025
| pool TEXT PRIMARY KEY, | ||
| slot BIGINT NOT NULL, | ||
| last_update_timestamp BIGINT NOT NULL, | ||
| volatility_accumulator NUMERIC NOT NULL, |
Member
There was a problem hiding this comment.
we don't use dynamic fees, but i guess we can track this
| Filter: &pb.SubscribeRequestFilterAccountsFilter_Memcmp{ | ||
| Memcmp: &pb.SubscribeRequestFilterAccountsFilterMemcmp{ | ||
| // Base mint is after discriminator, VolatilityTracker, config and creator | ||
| Offset: 8 + (8 + 8 + 16 + 16 + 16) + 32 + 32, |
Member
There was a problem hiding this comment.
here's an interesting gpt suggestion to avoid magic
package dbc
import (
"bytes"
bin "github.com/gagliardetto/binary"
"github.com/gagliardetto/solana-go"
"api.audius.co/solana/spl/programs/meteora_dbc"
)
// Mirror exactly the fields that appear BEFORE BaseMint in the on-chain Pool layout.
// IMPORTANT: order and types must match the Borsh schema used on-chain!
type poolPrefixBeforeBaseMint struct {
VolatilityTracker meteora_dbc.VolatilityTracker
Config solana.PublicKey
Creator solana.PublicKey
}
func borshSize[T any](v T) int {
var buf bytes.Buffer
enc := bin.NewBorshEncoder(&buf)
_ = enc.Encode(v) // layout is known; errors here would mean schema mismatch
return buf.Len()
}
var OffsetBaseMintInPool int
func init() {
const anchorDiscriminatorSize = 8
OffsetBaseMintInPool = anchorDiscriminatorSize + borshSize(poolPrefixBeforeBaseMint{})
}
| @@ -76,7 +75,6 @@ func (app *ApiServer) v1CreateCoin(c *fiber.Ctx) error { | |||
| "name": body.Name, | |||
| "logo_uri": body.LogoUri, | |||
| "description": body.Description, | |||
Member
There was a problem hiding this comment.
ill open a PR to remove FE
| return err | ||
| } | ||
|
|
||
| func upsertDbcPoolVolatilityTracker( |
Member
There was a problem hiding this comment.
also not necessary, but doesn't hurt
raymondjacobson
added a commit
to AudiusProject/apps
that referenced
this pull request
Oct 20, 2025
### Description Follows AudiusProject/api#485 Also add environment to sdk verifyuser script ### How Has This Been Tested? _Please describe the tests that you ran to verify your changes. Provide repro instructions & any configuration._ gen:dev types pass
raymondjacobson
added a commit
to AudiusProject/apps
that referenced
this pull request
Oct 20, 2025
### Description Follows AudiusProject/api#485 Also add environment to sdk verifyuser script ### How Has This Been Tested? _Please describe the tests that you ran to verify your changes. Provide repro instructions & any configuration._ gen:dev types pass
raymondjacobson
added a commit
to AudiusProject/apps
that referenced
this pull request
Oct 20, 2025
### Description Follows AudiusProject/api#485 Also add environment to sdk verifyuser script ### How Has This Been Tested? _Please describe the tests that you ran to verify your changes. Provide repro instructions & any configuration._ gen:dev types pass
raymondjacobson
added a commit
to AudiusProject/apps
that referenced
this pull request
Oct 20, 2025
### Description Follows AudiusProject/api#485 Also add environment to sdk verifyuser script ### How Has This Been Tested? _Please describe the tests that you ran to verify your changes. Provide repro instructions & any configuration._ gen:dev types pass
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.